<?php

namespace App\Models\Order;

use Hyn\Tenancy\Traits\UsesTenantConnection;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Order\OrderExtraFee
 *
 * @property int $id
 * @property string $name 支付名称
 * @property string|null $description
 * @property int $quantity 数量
 * @property float $unit_price 单价
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\Order\OrderItem $orderItem
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereDescription($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereQuantity($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereUnitPrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Order\OrderExtraFee whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class OrderExtraFee extends Model
{
    use UsesTenantConnection;
    protected $guarded = [];
    public function orderItem()
    {
        return $this->morphOne(OrderItem::class, "rentalable");
    }
}
